package service

import (
	"fabric-explorer/dao"
	"fabric-explorer/entity"

	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/mongo/options"
)

//初始化节点数据
func InitEvent() {

}

//插入数据
func InsertEvent(event entity.Event) {
	dao.InsertEvent(event)
}

//获得所有的Event
func GetAllEvent() []entity.Event {
	return dao.FindEventList(bson.D{})
}

//查询Event的page
func FindEventListPage(selecter bson.D, options *options.FindOptions) []entity.Event {
	return dao.FindEventListPage(selecter, options)
}

//获得所有的Event的数量
func GetEventkNum(selecter bson.D) int64 {
	return dao.GetEventNum(selecter)
}
